﻿@using GN.Pay.AdminWeb.Models
@model QRCodePayModel
<link href="~/Content/cashie/paygate.css" rel="stylesheet" />
<link href="~/Content/css/inner.css" rel="stylesheet" />
<script src="~/Scripts/jquery-2.1.4.min.js"></script>
<script src="~/Scripts/jquery.signalR-2.2.1.js"></script>
<body style="background-color:#4b5b78">
    <div class="bg-gray cl">
        <div class="w990 main">
            <div class="m pay-box" style="border:50px solid #4b5b78;">
                <div style="width:200px;height:50px;margin:0 auto;padding:10px; font-size:30px;color:white">贵农收银台</div>
                <div class="qrcode-box cl">
                    <div class="p-w-hd" style="width:1000px;">微信扫码支付<span style="border:1px solid #4b5b78;margin-left:20px;background-color:#4b5b78;color:white;"> <span><span>订单号：</span>@Model.OrderNo</span>  <span style="margin-left:20px">支付金额：</span><span>@Model.PayMoney.ToString("N2")</span></span>
                        <span style="margin-left:20px">订单详情： @Model.Body</span>
                    </div>
                    <div class="p-w-bd" style="overflow:hidden">
                        <div class="p-w-box">
                            <div class="pw-box-hd">
                                <img src="@Model.QrCodePath" width="200">
                            </div>
                            <div class="pw-box-ft" style="height:60px">
                                <p>请使用微信扫一扫进行支付</p>
                            </div>
                        </div>
                        <div class="p-w-sidebar" style="background-image: url('../../Content/images/phone-bg.png'); "></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>              
        var connection = $.hubConnection();
        var notifyProxy = connection.createHubProxy('notifyHub');
        notifyProxy.on('notify', function (msg) {            
            var obj = JSON.parse(msg);
            // location.href = obj.url + "?" + obj.urlParams;
            location.href = "/Notify/WeiXin/OrderPayReturn?applyId=" + obj.applyId;
        });
        connection.start().done(function () {
            notifyProxy.invoke('registerApply','@Model.ApplyId');
        });
    </script>
</body>